@extends('Account::console.layout')

@section('breadcrumb')

    <el-breadcrumb-item>应用登录日志</el-breadcrumb-item>

@stop


@section('content')

    <el-card class="box-card">
        <template slot="header">
            <form class="form-inline" action="" method="GET">
                <div class="form-group">
                    <label >应用名</label>
                    <input type="text" name="oauth_app_name" value="{{data_get($search,'oauth_app_name','')}}" class="form-control" >
                </div>
                <div class="form-group">
                    <label >用户名</label>
                    <input type="text" name="user_name" value="{{data_get($search,'user_name','')}}" class="form-control" >
                </div>
                <button type="submit" class="btn btn-primary ">搜索</button>
            </form>
        </template>
        <table class="table">
            <thead>
            <tr>
                <th scope="col">#</th>
                <th scope="col">应用名</th>
                <th scope="col">回调地址</th>
                <th scope="col">STATE参数</th>
                <th scope="col">用户</th>
                <th scope="col">登录平台</th>
                <th scope="col">登录IP</th>
                <th scope="col">时间</th>
            </tr>
            </thead>
            <tbody>
            @foreach($models as $model)
            <tr>
                <th scope="row">{{$loop->iteration}}</th>
                <td>{{data_get($model,'oauth_app.name','')}}</td>
                <td>{{data_get($model,'oauth_app_return','')}}</td>
                <td>{{data_get($model,'oauth_app_state','')}}</td>
                <td>{{data_get($model,'login_user.name','')}}</td>
                <td>{{data_get($model,'login_platform','')}}</td>
                <td>{{data_get($model,'login_ip','')}}</td>
                <td>{{data_get($model,'updated_at','')}}</td>
            </tr>
            @endforeach

            </tbody>
        </table>
        <div class="pagination">
            {!! $pager !!}
        </div>
    </el-card>

    <!-- /.box -->

@endsection


@section('footer-script')
    @parent
    @include('LaravelExtend::file_service')
@endsection
